﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TinyERP.ERP.Entity
{
    [NHibernate.Mapping.Attributes.Class(Table = "ContactAddress", NameType = typeof(Address))]
    public class Address
    {
        [NHibernate.Mapping.Attributes.Id(0, TypeType = typeof(long), Column = "ID", Name = "ID")]
        [NHibernate.Mapping.Attributes.Generator(1, Class = "native")]
        public virtual long ID { get; set; }

        [NHibernate.Mapping.Attributes.Property(Column = "IsMainAddress")]
        public virtual bool IsMainAddress { get; set; }

        [NHibernate.Mapping.Attributes.Property(Column = "StreetAddress")]
        public virtual string StreetAddress { get; set; }

        [NHibernate.Mapping.Attributes.Property(Column = "City")]
        public virtual string City { get; set; }

        [NHibernate.Mapping.Attributes.Property(Column = "Country")]
        public virtual string Country { get; set; }

        [NHibernate.Mapping.Attributes.ManyToOne(Column = "ContactID", ClassType = typeof(Contact))]
        public virtual Contact Contact { get; set; }
    }
}
